1. Field of the Invention
The present invention relates to the; and technology of correcting an image, and more specifically to an image status estimating method, an image correcting method, and an image correction apparatus for obtaining a characteristic amount of a plurality of areas forming an image, estimating the status of the image by obtaining the statistic amount for estimation of the status of the image based on the characteristic amount, and correcting the image based on the estimation result. The present invention can be applied to all fields of industries processing images such as an image relevant appliance industry of a digital camera, a color printer, etc.
2. Description of the Related Art
With the spread of image relevant appliances such as a digital camera, a color printer, etc. and the improvement of the performance of computers, there have been an increasing number of machines which can be operated by general consumers to process digital color images. However, the quality of a color image captured by a digital camera, etc. does not always satisfy a user.
For example, some images are too dark and insufficient in contrast. Therefore, the technology of improving the quality of an original image to easily obtain a satisfactory image, that is, the technology of correcting an image, is required.
There have been the following four typical conventional methods for correcting an image.
The first method is to correct the bias of the histogram depending on the form of the histogram of the intensity of an image, and to correct the tone level of the image such that the histogram can be smoothly formed as described in the following documents.
Document 1) Kobayashi, et al. ‘A method of tone correction for PDP’ from Color Forum Japan '99, p 17-20 (1999)
FIG. 1 is a flowchart of the process in the first method. In FIG. 1, the apparatus for performing an image process obtains the distribution of the tone level for each pixel of an image in step S101, places restrictions in step S102 when the distribution shows an exceeding bias, generates a correction curve based on the restricted distribution data in step S103, and corrects the tone level in step S104. The correction curve can be a curve based on an exponential function, and the tone level is corrected with an excess correction avoided.
The second method is to compute the intensity for each small area after dividing an image into a plurality of small areas in a lattice form. The brightness of the image is corrected according to the computed intensity information. This method is described in the following document.
Document 2) Akira Inoue ‘Brightness Correction Apparatus’ (Japanese Patent Application No. 150566 of 1998.
FIG. 2 is a flowchart of the process in the second method. In FIG. 2, an image processing device first divides an image into a plurality of predetermined small areas, that is, into small areas in a lattice form, in step S106, and then computes an average value in brightness for each small area in step S107. In step S108, it obtains a value by dividing a sum of the maximum and minimum values of the intensity average values by 2, and corrects the tone level based on the computation result in step S109. As a correction curve, an exponential function is used as in the first method.
In the third method, an image is divided into a plurality of areas based on the distribution of the colors of the image. The correction is made such that the distribution of the brightness can be appropriately obtained for each area. This method is described in the following document.
Document 3) Juha Katajamaki and Pekka Laihanen, ‘Image Dependent Gamma Selection Based on Color Palette Equalization and Simple Lightness Model’, Proc. of 7th CIC, 301-306 (1999).
FIG. 3 is a flowchart of the process of the third method. In this method, an image processing device first divides an image into a plurality of areas according to color information in step S111, and computes an average value of the brightness for each area in step S112. In step S113, the image is corrected using a correction curve based on an exponential function such that the average value of the brightness can be evenly distributed. In dividing an image into areas, clustering technology is used after mapping each pixel of an original image into color space points as feature space.
In the fourth method, for example, an image is divided into 16×16 small areas in a predetermined dividing method independent of the contents of the image, an importance level of an area is determined based on the characteristic amount of, for example, standard deviation, etc. for each of the small divided areas, and the image is corrected based on the histogram of only important areas. This method is described in the following document.
Document 4) Kurt Helfriedwinkelman ‘Method and Apparatus for Analyzing and Correcting Image Gradation of Original Image’ Japanese Patent Application No. 98173 of 1994.
FIG. 4 is a flowchart of the process in the fourth method. In FIG. 4, an image processing device first divides the entire image into predetermined small areas in step S116, computes the importance level for each of the small areas in step S117, and determines a tone level correction curve with only important areas taken into account based on the important level in step S118, thereby correcting the image.
As described above, some methods have been suggested to correct an image. However, these conventional methods have the following problems.
In the first method, the process is performed based on the histogram of the intensity of a pixel. Therefore, with an image in which the tone levels are concentrated on lower levels, there is the problem that a correction amount largely depends on the tone levels at lower levels. Although the problem is to be solved by suppressing a large correction in the above mentioned document, there is still the problem that an appropriate correction cannot be made to an image actually requiring a large correction.
In the second method, an average value of the intensity is obtained for each of the divided small areas, and a correction amount is determined based on the intermediate value between the maximum and minimum values of the average values. Then, as in the first method, the problem occurring when values concentrate on a specific tone level can be avoided. However, the level between the maximum and minimum values is not considered at all, and there also occurs the problem that an appropriate correction cannot be made to an image where an intermediate tone level has not been appropriately obtained.
In the third method, a process is performed after dividing an image into a plurality of areas based on the distribution of color. Therefore, the problem occurring when there is a strong bias toward a specific tone level can be solved to a certain extent.
For example, when most part of an image, for example a night view, is dark, the image is likely to be determined to be too dark entirely in the first method. However, in the third method, the dark portion of the image is processed as one area, and other bright colors are separately processed as individual areas. Therefore, it is rare that the entire image is too dark.
However, since each area is evaluated based on the same weight in this method, a problem can occur. To be practical, since a very small area can be evaluated as an area, a small area can be overestimated in the other way of the first method. For example, if there are a number of small lights in the distance in a night view, it can be determined that there are a number of bright areas, and it is mistakenly determined that the image is bright in most part of it.
In the fourth method, since an image is divided into a plurality of areas in a predetermined method, a division result is independent of the taste or a recognition result of a person about the image. There is no problem when the boundary of divided areas accidentally matches the boundary between an area which a user considers important and an area which he or she considers unimportant. However, the boundaries do not necessarily match each other. Half the generated areas can be considered important, and the other half can be considered unimportant. That is, there is a problem that an image can be inappropriately divided to perform a desired process for the feeling of a user.
As described above, according to the conventional technology, there has been the problem that an image cannot be appropriately corrected when there is a large area having a specific tone level, when the brightness of an area having an intermediate tone level is not appropriate, or when there are a number of small objects. Furthermore, there is the problem that an image cannot be correctly corrected when the boundary of divided areas in a predetermined method does not match the boundary corresponding to the feeling in importance of a user.